package indoor.nexd.com.nexdmap.nexdmapoverly;

import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.view.MotionEvent;

import cn.nexd.map.rendering.core.SVGMapBaseOverlay;
import cn.nexd.map.rendering.core.componet.data.Feature;
import cn.nexd.map.utils.BitmapUtils;

/**
 * Created by wangxu on 16/4/12.
 */
public class HighLightOverlay extends SVGMapBaseOverlay {


    private Feature feature;

    public HighLightOverlay(Feature feature) {
        this.feature = feature;
        showLevel = LOCATION_LEVEL - 2;
    }

    public void resetFeature (Feature feature) {
       this.feature = feature;
    }

    @Override
    public void onDestroy() {

    }

    @Override
    public void onPause() {

    }

    @Override
    public void onResume() {

    }

    @Override
    public void onTap(MotionEvent event) {

    }

    @Override
    public void draw(Canvas canvas, Matrix matrix, float currentZoom, float currentRotateDegrees) {
        canvas.save();
        Paint paint = new Paint();
        paint.setColor(BitmapUtils.a);
        canvas.setMatrix(matrix);
        canvas.drawPath(feature.getPath(), paint);
        canvas.restore();
    }
}
